package com.omg.persistence.delegate.lifepoint;

import java.util.List;

import com.ibatis.dao.client.DaoManager;
import com.omg.persistence.dao.lifepoint.DaoConfig;
import com.omg.persistence.dao.lifepoint.entity.LPActivityRequest;
import com.omg.persistence.dao.lifepoint.iface.LPActivityRequestDao;

public class LPActivityRequestDelegate {

	private static volatile LPActivityRequestDelegate instance;
	private LPActivityRequestDao lpActivityRequestDao;
	private static final Object synObj = new Object();

	public static LPActivityRequestDelegate getInstance() {
		if (instance == null) {
			instance = new LPActivityRequestDelegate();
		}
		return instance;
	}

	private LPActivityRequestDelegate() {
		synchronized (synObj) {
			DaoManager daoMgr = DaoConfig.getDaoManager();
			this.lpActivityRequestDao = (LPActivityRequestDao) daoMgr
					.getDao(LPActivityRequestDao.class);
		}
	}

	public List<LPActivityRequest> getActivityRequestsByUseridAndIsnew(
			String userid, boolean isnew) {
		return this.lpActivityRequestDao.getActivityRequestsByUseridAndIsnew(
				userid, isnew);
	}
}
